<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport"
			content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<title>橡塑装备</title>
		<link rel="stylesheet" href="/mobile/css/mobile.css" />
		<script src="/mobile/js/jquery.min.js"></script>
		<script src="/mobile/js/jquery.easing.min.js"></script>
		<script src="/mobile/js/TouchSlide.1.1.js"></script>
	</head>
	<body>
		
		<div class="main">
			<div class="search_container">
				<input type="search" class="search" placeholder="输入企业名称或产品名称"  />
			</div>

			<div id="focus" class="focus">
				<div class="hd">
					<ul></ul>
				</div>
				<div class="bd">
					<ul>
						{volist name="rs_banner" id="item"}
						<li><a href="{php}
							if($item['content_type']==1){
								echo url('article/detail',['banner_id'=>$item['id']]);
							}else if($item['content_type']==2){
								echo $item['url'];
							}else{
								echo '#';
							}
						{/php}"><img src="{$item.image}" /></a></li>
						{/volist}

					</ul>
				</div>
			</div>

			<ul class="xiangsu_index_nav">
				{volist name="nav" id="item"}
				<li><a href="{:url('xiangsu/category',['id'=>$item.id])}"><img src="{$item.image?$item.image:$nopic}"><div class="title">{$item.name}</div></a></li>
				{/volist}
				<li><a href="{:url('xiangsu/all_category')}"><img src="/mobile/img/ico_fenlei.png"><div class="title">全部分类</div></a></li>
			</ul>
		</div>
		<div class="gap"></div>
		<div class="main" style="padding-top: 15px;">
			
			<div class="sec_title">企业<a href="{:url('qiye/index')}">更多 >></a></div>
			<ul class="qiyelist" style="padding: 0;">
				{volist name="qiye" id="item"}
					{if ($i<3)}
				<a href="{:url('qiye/detail',['id'=>$item.id])}"><li>
					<div class="img" style="background-image: url({$item.image});"></div>
					<div class="content">
						<h3 class="title">{$item.name}</h3>
					</div>
				</li></a>
					{else/}
						<a href="{:url('qiye/detail',['id'=>$item.id])}"><li>
							<div class="content">
								<h3 class="title">{$item.name}</h3>
							</div>
						</li></a>
					{/if}
				{/volist}
				
			</ul>
		</div>
		<div class="bg_gray_main">
			<div class="sec_title">产品列表<a href="{:url('product/index')}">更多 >></a></div>
			<div class="gap"></div>
				
				<ul class="goodslist" style="padding: 0; min-height: auto;">
					{volist name="product" id="item"}
					<a href="{:url('product/detail',['id'=>$item.id])}">
					<li 
					{switch name="item.biaoji"}
					    {case value="1"}class="youzhi"{/case}
					    {case value="2"}class="chuangxin"{/case}
					    {default /}
					{/switch}
					
					><div class="img" style="background-image: url({$item.image});"></div>
						<div class="title">{$item.name}</div>
						<div class="desc">{$item.qiye_name}</div>
					</li></a>
					{/volist}
					
				</ul>
				<div style="text-align: center;">
					{$product->render()}
				</div>	
				
		</div>
		{include file="common/footer"}
	</body>
	<script type="text/javascript">
		TouchSlide({
			slideCell: "#focus",
			titCell: ".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
			mainCell: ".bd ul",
			effect: "left",
			autoPlay: true, //自动播放
			autoPage: true, //自动分页
		});
		$("input.search").keypress(function (e) {
		    	// 兼容写法
		      e = e || window.event;
		      key = e.keyCode || e.which || e.charCode;
		      if (key == 13) {
		          console.log($(this).val());
				  if($(this).val().trim()==''){
					  alert('请输入关键词');
					  return false;
				  }
				  window.open('{:url('xiangsu/search')}?keyword='+$(this).val(),'_blank')
		      }
		  });
		  
		 
	</script>
</html>